﻿using UnityEngine;

namespace Manox.Libs.MVC
{
    /// <summary>
    /// Controller base.
    /// </summary>
    public abstract class ControllerBase : MonoBehaviour
    {
        /// <summary>Position.</summary>
        [HideInInspector]
        public Vector3 Position
        {
            get { return this.transform.position; }
        }           
        
        /// <summary>Actual speed.</summary>
        public virtual float ActualSpeed 
        {
            get { return 0.0f; }
        }     
        
        /// <summary>
        /// Awake.
        /// </summary>
        public virtual void Awake() { }

        /// <summary>
        /// Destroy.
        /// </summary>
        public virtual void Destroy() { }

        /// <summary>
        /// Set model.
        /// </summary>
        /// <param name="model"></param>
        public virtual void SetModel(Model model) { }

        /// <summary>
        /// Set position rotation.
        /// </summary>
        /// <param name="position"></param>
        /// <param name="rotation"></param>
        public virtual void SetPositionRotation(Vector3 position, Quaternion rotation) { }

        /// <summary>Fixed update.</summary>
        public virtual void FixedUpdate() { }
    }
}
